package listener.subject.concrete_subject;

import listener.obsever.concrete_observer.SharesPeople;
import listener.subject.Shares;

public class SharesEvent extends Shares {
    @Override
    public void notifyPeople(int num) {
        if(num>=5){
            for(Object obj:people){
                System.out.print("***股票变化：");
                ((SharesPeople)obj).response();
            }
        }else{
            System.out.print("股票变化：");
            System.out.println("正常..");
        }
    }
}
